
function addLoadEvent(func) {
    var oldonLoad = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    }
    else {
        window.onload = function () {
            oldonload();
            func();
        }
    }
}


//        获取选择器元素
function getId(selector) {
    var ele = document.querySelector(selector);
    return ele;
}

function getClass(selector) {
    var ele = document.querySelectorAll(selector);
    return ele;
}

function getTagName(selector) {
    var ele = document.getElementsByTagName(selector);
    return ele;
}